<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateUserAvatarLog extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('user_avatar_log', function (Blueprint $table) {
            //
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->string('detail', 200)->default('')->comment('头像地址');
            $table->tinyInteger('flag')->default(1)->comment('状态');
            $table->tinyInteger('role')->default(1)->comment('角色 1=普通用户 2=主播用户');
            $table->timestamps();

        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('user_avatar_log');
    }
}
